"use strict";
cc._RF.push(module, '8a0aczl3B1MVa09X9ZRXdn/', 'o1Loading');
// scripts/engines/modules/uiModule/o1Loading.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
var gameEngine_1 = require("../../gameEngine");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var o1Loading = /** @class */ (function (_super) {
    __extends(o1Loading, _super);
    function o1Loading() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.ndBg = null;
        _this.loadingNodes = [];
        return _this;
        // update (dt) {}
    }
    // LIFE-CYCLE CALLBACKS:
    o1Loading.prototype.onLoad = function () {
        gameEngine_1.modules().uiControlModule.setGaussianMode(this.ndBg);
    };
    o1Loading.prototype.start = function () {
        this.loadingAni();
        // let mask = this.ndIcon.getChildByName('mask');
        // mask.height = 0;
        // cc.tween(mask)
        //     .then(
        //         cc.tween()
        //             .to(1, {height: 256})
        //             .to(0, {height: 0})
        //     )
        //     .repeatForever()
        //     .start();
        // this.schedule(() => {
        //     this.ndIcon.angle -= 22.5;
        // }, 0.1);
    };
    o1Loading.prototype.loadingAni = function () {
        var _this = this;
        this.loadingNodes.forEach(function (n) {
            n.active = false;
        });
        this.loadingNodes.forEach(function (n, index) {
            _this.scheduleOnce(function () {
                n.active = true;
            }, index * 0.2);
        });
        this.scheduleOnce(this.loadingAni, 0.8);
    };
    o1Loading.prototype.showLoading = function (text) {
        // this.lbLoadText.string = text;
    };
    __decorate([
        property(cc.Node)
    ], o1Loading.prototype, "ndBg", void 0);
    __decorate([
        property({ type: cc.Node, tooltip: "加载节点" })
    ], o1Loading.prototype, "loadingNodes", void 0);
    o1Loading = __decorate([
        ccclass
    ], o1Loading);
    return o1Loading;
}(cc.Component));
exports.default = o1Loading;

cc._RF.pop();